#pragma once
#include "Graphic.h"

namespace Core
{
	struct Rect;
}
using Core::Rect;

namespace Graphics
{
	class Renderable2D;

	class Viewport :public Renderable,protected Graphic
	{
		friend Renderable2D;

	private:
		Rect* m_pRenderRect;

	protected:
		// Render every Renderable obj in the render list
		virtual bool RenderImpl(void);

	public:
		Viewport(const Rect* pRect = 0);
		virtual ~Viewport(void);

		virtual void SetSequence(int sequence);

		void SetRenderRect(const Rect& rect);
		const Rect& GetRenderRect(void);
	};
}
